package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_res_infoBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_res_infoBean() throws YaconException {
		super();
		setTableName("LEO_RES_INFO");
	}
	String  fres_oper;
	String  fres_time;
	String  fdisk_id;
	String  fres_memo;
	String  fres_nam;
	String  fres_id;
	String  fres_tag_memo;
	String  fres_store_place;
	String  fres_store_size;
	String  fres_typ;

	public void setRes_oper( String res_oper)throws YaconException{
		setFieldData("res_oper",res_oper,TEXT);
		this.fres_oper=res_oper;
	}

	public String getRes_oper(){
		if ( this.fres_oper == null){
			return "";
		}
		else {
			return this.fres_oper;
		}
	}

	public void setRes_time( String res_time)throws YaconException{
		setFieldData("res_time",res_time,DATE);
		this.fres_time=res_time;
	}

	public String getRes_time(){
		if ( this.fres_time == null){
			return "";
		}
		else {
			return this.fres_time;
		}
	}

	public void setDisk_id( String disk_id)throws YaconException{
		setFieldData("disk_id",disk_id,TEXT);
		this.fdisk_id=disk_id;
	}

	public String getDisk_id(){
		if ( this.fdisk_id == null){
			return "";
		}
		else {
			return this.fdisk_id;
		}
	}

	public void setRes_memo( String res_memo)throws YaconException{
		setFieldData("res_memo",res_memo,TEXT);
		this.fres_memo=res_memo;
	}

	public String getRes_memo(){
		if ( this.fres_memo == null){
			return "";
		}
		else {
			return this.fres_memo;
		}
	}

	public void setRes_nam( String res_nam)throws YaconException{
		setFieldData("res_nam",res_nam,TEXT);
		this.fres_nam=res_nam;
	}

	public String getRes_nam(){
		if ( this.fres_nam == null){
			return "";
		}
		else {
			return this.fres_nam;
		}
	}

	public void setRes_id( String res_id)throws YaconException{
		setFieldData("res_id",res_id,TEXT);
		this.fres_id=res_id;
	}

	public String getRes_id(){
		if ( this.fres_id == null){
			return "";
		}
		else {
			return this.fres_id;
		}
	}

	public void setRes_tag_memo( String res_tag_memo)throws YaconException{
		setFieldData("res_tag_memo",res_tag_memo,TEXT);
		this.fres_tag_memo=res_tag_memo;
	}

	public String getRes_tag_memo(){
		if ( this.fres_tag_memo == null){
			return "";
		}
		else {
			return this.fres_tag_memo;
		}
	}

	public void setRes_store_place( String res_store_place)throws YaconException{
		setFieldData("res_store_place",res_store_place,TEXT);
		this.fres_store_place=res_store_place;
	}

	public String getRes_store_place(){
		if ( this.fres_store_place == null){
			return "";
		}
		else {
			return this.fres_store_place;
		}
	}

	public void setRes_store_size( String res_store_size)throws YaconException{
		setFieldData("res_store_size",res_store_size,TEXT);
		this.fres_store_size=res_store_size;
	}

	public String getRes_store_size(){
		if ( this.fres_store_size == null){
			return "";
		}
		else {
			return this.fres_store_size;
		}
	}

	public void setRes_typ( String res_typ)throws YaconException{
		setFieldData("res_typ",res_typ,TEXT);
		this.fres_typ=res_typ;
	}

	public String getRes_typ(){
		if ( this.fres_typ == null){
			return "";
		}
		else {
			return this.fres_typ;
		}
	}

	public  List<Leo_res_infoBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_res_infoBean> listBeans = new ArrayList<Leo_res_infoBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_res_infoBean fDaoBean  = new Leo_res_infoBean();
			fDaoBean.fres_oper = findTable.getString("res_oper");
			fDaoBean.fres_time = findTable.getString("res_time");
			fDaoBean.fdisk_id = findTable.getString("disk_id");
			fDaoBean.fres_memo = findTable.getString("res_memo");
			fDaoBean.fres_nam = findTable.getString("res_nam");
			fDaoBean.fres_id = findTable.getString("res_id");
			fDaoBean.fres_tag_memo = findTable.getString("res_tag_memo");
			fDaoBean.fres_store_place = findTable.getString("res_store_place");
			fDaoBean.fres_store_size = findTable.getString("res_store_size");
			fDaoBean.fres_typ = findTable.getString("res_typ");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_res_infoBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_res_infoBean fDaoBean  = new Leo_res_infoBean();
			fDaoBean.fres_oper = findTable.getString("res_oper");
			fDaoBean.fres_time = findTable.getString("res_time");
			fDaoBean.fdisk_id = findTable.getString("disk_id");
			fDaoBean.fres_memo = findTable.getString("res_memo");
			fDaoBean.fres_nam = findTable.getString("res_nam");
			fDaoBean.fres_id = findTable.getString("res_id");
			fDaoBean.fres_tag_memo = findTable.getString("res_tag_memo");
			fDaoBean.fres_store_place = findTable.getString("res_store_place");
			fDaoBean.fres_store_size = findTable.getString("res_store_size");
			fDaoBean.fres_typ = findTable.getString("res_typ");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("res_oper") != null)
			setRes_oper(viewRecord.getString("res_oper"));
		if (viewRecord.getString("res_time") != null)
			setRes_time(viewRecord.getString("res_time"));
		if (viewRecord.getString("disk_id") != null)
			setDisk_id(viewRecord.getString("disk_id"));
		if (viewRecord.getString("res_memo") != null)
			setRes_memo(viewRecord.getString("res_memo"));
		if (viewRecord.getString("res_nam") != null)
			setRes_nam(viewRecord.getString("res_nam"));
		if (viewRecord.getString("res_id") != null)
			setRes_id(viewRecord.getString("res_id"));
		if (viewRecord.getString("res_tag_memo") != null)
			setRes_tag_memo(viewRecord.getString("res_tag_memo"));
		if (viewRecord.getString("res_store_place") != null)
			setRes_store_place(viewRecord.getString("res_store_place"));
		if (viewRecord.getString("res_store_size") != null)
			setRes_store_size(viewRecord.getString("res_store_size"));
		if (viewRecord.getString("res_typ") != null)
			setRes_typ(viewRecord.getString("res_typ"));
	}

}
